import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-05-07
 * Time: 17:23
 */
class Complex {
    private double real;
    private double imaginary;

    public Complex() {
        this.real = 0;
        this.imaginary = 0;
    }

    public Complex(double real, double imaginary) {
        this.real = real;
        this.imaginary = imaginary;
    }

    public void setRealPart(double real) {
        this.real = real;
    }

    public void setImaginaryPart(double imaginary) {
        this.imaginary = imaginary;
    }

    @Override
    public String toString() {
        if(real != 0 && imaginary != 0) {
            if (imaginary > 0) {
                return real + "+" + imaginary + "i";
            } else {
                return real + "" + imaginary + "i";
            }
        } else if (imaginary == 0) {
            return real + "";
        } else {
            return imaginary + "i";
        }
    }
    public String add(Complex o) {
        double real = this.real + o.real;
        double imaginary = this.imaginary + o.imaginary;
        Complex complex = new Complex(real, imaginary);
        return complex.toString();
    }
    public String sub(Complex o) {
        double real = this.real - o.real;
        double imaginary = this.imaginary - o.imaginary;
        Complex complex = new Complex(real, imaginary);
        return complex.toString();
    }
}
class Furniture {
    private int length;
    private int width;
    private int height;

    public Furniture(int length, int width, int height) {
        this.length = length;
        this.width = width;
        this.height = height;
    }

    public int getLength() {
        return length;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }
}
class MyDate {
    private int year;
    private int month;
    private int day;

    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }
    public void print() {
        System.out.print(this.month + "/" + this.day + "/" + this.year + " ");
    }
    public int compare(MyDate d) {
        if(this.year < d.year) {
            return -1;
        } else if (this.year == d.year) {
            if (this.month < d.month) {
                return -1;
            } else if (this.month == d.month) {
                return Integer.compare(this.day, d.day);
            } else {
                return 1;
            }
        } else {
            return 1;
        }
    }
}
class Person {
    private String name;
    private String sex;
    private int age;
    static int avgAge;

    public int getAge() {
        return age;
    }

    public Person(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public static int getAvgAge() {
        return avgAge / 3;
    }
}
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.print(n + "*" + n + "*" + n + "=" + (int)Math.pow(n, 3) + "=");
        int num = n * n - n + 1;
        int flag = 0;
        double m = Math.pow(n, 3);
        while(m > 0) {
            if(flag == 0) {
                System.out.print(num);
                flag = 1;
            } else {
                System.out.print("+" + num);
            }
            m -= num;
            num += 2;
        }
    }
    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int[] count = new int[10];
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            count[c - '0']++;
        }
        long ans = 0;
        for (int i = 0; i < 10; i++) {
            ans += count[i];
            ans *= 10;
        }
        System.out.println(ans);
    }
    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int a1 = a;
        int n = scanner.nextInt();
        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += a;
            a = a * 10 + a1;//2
        }
        System.out.println(sum);
    }
    public static int finishedCount(int n) {
        int sum = 0;
        for (int i = 1; i < n; i++) {
            if(n % i == 0) {
                sum += i;
            }
        }
        return sum;
    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int flag = 0;
        for (int i = 2; i <= n; i++) {
            int num = finishedCount(i);
            if(num == i) {
                if(flag == 0) {
                    flag = 1;
                    System.out.print(i);
                } else {
                    System.out.print("," + i);
                }
            }
        }
    }
    public static int factorial(int n) {
        int sum = 1;
        for (int i = 1; i <= n; i++) {
            sum *= i;
        }
        return sum;
    }
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += factorial(i);
        }
        System.out.println(sum);
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Person person1 = new Person(scanner.next(), scanner.next(), scanner.nextInt());
        Person.avgAge += person1.getAge();
        Person person2 = new Person(scanner.next(), scanner.next(), scanner.nextInt());
        Person.avgAge += person2.getAge();
        Person person3 = new Person(scanner.next(), scanner.next(), scanner.nextInt());
        Person.avgAge += person3.getAge();
        System.out.println(Person.getAvgAge());
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        MyDate myDate = new MyDate(scanner.nextInt(), scanner.nextInt(), scanner.nextInt());
        MyDate myDate1 = new MyDate(scanner.nextInt(), scanner.nextInt(), scanner.nextInt());
        myDate.print();
        System.out.println(myDate.compare(myDate1));
    }
    public static void main2(String [] args){
        Complex a=new Complex();
        Complex b=new Complex();
        Scanner in=new Scanner(System.in);
        a.setRealPart(in.nextDouble());
        a.setImaginaryPart(in.nextDouble());
        b.setRealPart(in.nextDouble());
        b.setImaginaryPart(in.nextDouble());
        System.out.println(a);
        System.out.println(b);
        System.out.println(a.add(b));
        System.out.println(a.sub(b));
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        Furniture f = new Furniture(sc.nextInt(),sc.nextInt(),sc.nextInt());
        System.out.println(f.getHeight());
        System.out.println(f.getLength());
        System.out.println(f.getWidth());
    }
}
